package com.hd.aop0410.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserVo {
    //要求name不能为空白字符 （空格、tab)
    @NotBlank @Size(min = 5,max = 10)
    private String name;
    @NotEmpty @Size(min = 6,max =20)
    private String password;
    @Email
    private String email;
    //正则表达式
    @Pattern(regexp = "^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0\\d|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[\\dXx]$")
    private String sfz;
    @Min(1) @Max(150)
    private int age;
}
